<template>
	<view class="my-search-container" :style="{'background-color': search_bgcolor}">
		<view class="my-search-box" @click="goSrearch" :style="{'border-radius': search_radius + 'px'}">
			<u-icon name="search" size="17"></u-icon>
			<text>搜索</text>
		</view>
	</view>
</template>

<script>
	
	export default {
		name:"my-search",
		props:{
			search_bgcolor: {
				type:String,
				default:"#eb4450"
			},
			search_radius: {
				type: Number,
				default: 18 //px
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			goSrearch(){
				uni.navigateTo({
					url:'../../subpkg/sreach_detail/sreach_detail'
				})
				this.$emit('click') //为主组建设置click方法
			},
			
		}
	}
</script>

<style lang="scss">
	.my-search-container {
	  // background-color: #eb4450;
	  height: 50px;
	  padding: 0 10px;
	  display: flex;
	  align-items: center;
	  .my-search-box {
	    height: 36px;
	    background-color: #ffffff;
	    // border-radius: 15px;
	    width: 100%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    .placeholder {
	      font-size: 15px;
	      margin-left: 5px;
	    }
	  }
	}
	
</style>